<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .adv {
        /* width: 200px;
        height: 200px; */
        /* background-color: cyan; */
        position: fixed;
        right: 0px;
        bottom: 0px;
      }
      button {
        position: absolute;
      }
    </style>
  </head>
  <body>
    <div class="adv">
      <button>关闭</button>
      <img src="123.gif" alt="" />
    </div>
    <script>
      var advEle = document.querySelector(".adv");
      var closeEle = document.querySelector(".adv button");

      closeEle.onclick = function () {
        advEle.style.display = "none";
        setTimeout(function () {
          advEle.style.display = "block";
        }, 1000);
      };
    </script>
  </body>
</html>
